package code1.double_pointer;

/**
 * 原题链接：https://leetcode.cn/problems/reverse-string/description/
 */
public class P334 {

    public void reverseString(char[] s) {
        for(int i=0,j=s.length-1;i<j;i++,j--){
            s[i]^=s[j];
            s[j]^=s[i];
            s[i]^=s[j];
        }
    }
}
